package com.dec.kks.etl;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class TT {

    public static void main(String[] args) throws Exception {

//        List<String> list = new ArrayList<String>();
//        Iterator<String> it = list.iterator();
//        while (it.hasNext()){
//
//        }

        Iterable<String> data = new Iterable<String>() {
            @Override
            public Iterator<String> iterator() {
                List<String> list = new ArrayList<String>();
                list.add("1");
                list.add("2");
                Iterator<String> it = list.iterator();
                return it;
            }
        };
        Iterator<String> it = data.iterator();
        while (it.hasNext()){
            System.out.println("***"+ it.next());
        }

//        ServerSocket s = new ServerSocket(8800);
//
//        while (true) {
//
//            InputStream stream = s.accept().getInputStream();
//            byte[] bytes = new byte[1024];
//            int b = stream.read(bytes);
//            for (int i = 0; i < 10; i++) {
//                System.out.println(bytes[i]);
//            }
//            Thread.sleep(1000L);
//
//        }
    }
}
